<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>

<!DOCTYPE html>
<html lang="zh-CN">
  <head>
	  <base href="${BaseContext}">
	  <meta charset="utf-8">
    
    <!--表示使用IE最新的渲染模式进行解析-->
    <meta http-equiv="X-UA-Compatible" content="IE=edge">

    <meta name="viewport" content="width=device-width, initial-scale=1">
    <title>添加或修改视频</title>
		<!-- 如果IE版本小于9，加载以下js,解决低版本兼容问题 -->
<!--[if lt IE 9]>
<script src="https://cdn.bootcss.com/html5shiv/3.7.3/html5shiv.min.js"></script>
<script src="https://cdn.bootcss.com/respond.js/1.4.2/respond.min.js"></script>
<![endif]-->

<script src="${pageContext.request.contextPath}/js/bootstrap.min.js"></script>
<script src="${pageContext.request.contextPath}/js/confirm.js"></script>
<script src="${pageContext.request.contextPath}/js/jquery.validate.min.js"></script>
<script src="${pageContext.request.contextPath}/js/message_cn.js"></script>
<link href="${pageContext.request.contextPath}/css/bootstrap.min.css" rel="stylesheet">
   <script src="http://static.runoob.com/assets/jquery-validation-1.14.0/lib/jquery.js"></script>
<script src="http://static.runoob.com/assets/jquery-validation-1.14.0/dist/jquery.validate.min.js"></script>
<script src="http://static.runoob.com/assets/jquery-validation-1.14.0/dist/localization/messages_zh.js"></script>
    <style type="text/css">
	  th{
		 text-align: center;
	  }
	  input.error { border: 1px solid red; }
		label.error {
		  background:url("${pageContext.request.contextPath}/img/unchecked.gif") no-repeat 0px 0px;
		
		  padding-left: 16px;
		
		  padding-bottom: 2px;
		
		  font-weight: bold;
		
		  color: #EA5200;
		}
		label.checked {
		  background:url("${pageContext.request.contextPath}/img/checked.gif") no-repeat 0px 0px;
		}
    </style>
    <script type="text/javascript">
       $(function(){
           $("#infoForm").validate();
       });
    </script>
  </head>
  <body>
  	
  	  <nav class="navbar-inverse">
	<div class="container">
		<!-- Brand and toggle get grouped for better mobile display -->
		<div class="navbar-header">
			<a class="navbar-brand" href="admin/video/index.action">视频管理系统</a>
		</div>

		<div class="collapse navbar-collapse"
			 id="bs-example-navbar-collapse-9">
			<ul class="nav navbar-nav" id="nan">
				<li ><a href="showVideo.action">视频管理</a></li>
				<li ><a href="showTecher.action">主讲人管理</a></li>
				<li class="active"><a href="showItem.action">课程管理</a></li>
			</ul>
			<p class="navbar-text navbar-right">
				<span>欢迎您，${sessionScope.username}</span> <i class="glyphicon glyphicon-log-in"
														 aria-hidden="true"></i>&nbsp;&nbsp;<a href="../admin/logout.action"
																							   class="navbar-link">退出</a>
			</p>
		</div>
	
		<!-- /.navbar-collapse -->


	</div>
	<!-- /.container-fluid -->
</nav>

    
    <div class="jumbotron" style="padding-top: 15px;padding-bottom: 15px;">
	  <div class="container">
	        <c:if test="${course.id !=null}">
	          <h2>修改主讲人</h2>
	      </c:if>
	      <c:if test="${course.id ==null}">
	          <h2>添加主讲人</h2>
	      </c:if>
	      
	  </div>
	</div>

	<div class="container" style="margin-top: 20px;">
		
		  <form id="infoForm" class="form-horizontal" action="saveTecher.action" method="post">
		      
		      
			  <div class="form-group">
			    <label for="videoUrl" class="col-sm-2 control-label">姓名</label>
			    <div class="col-sm-10">
			      <input type="text" id="speakerName" required name="speakerName" class="form-control"  value="${speaker.speakerName}"  placeholder="主讲人姓名">
			    </div>
			  </div>
			  
			  <div class="form-group">
			    <label for="videoUrl" class="col-sm-2 control-label">职位</label>
			    <div class="col-sm-10">
			      <input type="text" id="speakerJob" required name="speakerJob" class="form-control"  value="${speaker.speakerJob}"  placeholder="主讲人职位">
			    </div>
			  </div>
			  <div class="form-group">
			    <label for="videoUrl" class="col-sm-2 control-label">头像</label>
			    <div class="col-sm-10">
			      <input type="url" id="headImgUrl" required name="headImgUrl" class="form-control"  value="${speaker.headImgUrl}"  placeholder="主讲人头像">
			    </div>
			  </div>
			  <div class="form-group">
			    <label for="videoUrl" class="col-sm-2 control-label">简介</label>
			    <div class="col-sm-10">
			      <input type="text" id="speakerDesc" required name="speakerDesc" class="form-control"  value="${speaker.speakerDesc}"  placeholder="主讲人简介">
			    </div>
			  </div>
			 

			  <div class="form-group">
			    <div class="col-sm-offset-2 col-sm-10">
			      <button type="submit" class="btn btn-default">保存</button>
			    </div>
			  </div>
			</form>
		
	</div>

  </body>
</html>
